enyo.kind({
    name: "MyApps.GolfPlusApp",
    kind: enyo.VFlexBox,
    components: [{
        name: "pane",
        kind: "Pane",
        flex: 1,
        transitionKind: "enyo.transitions.LeftRightFlyin",
        components: [{
            name: "menu",
            kind: "VFlexBox",
            className: "bg-gp",
            components: [{
                kind: "PageHeader",
                content: "Bienvenue",
                className: "enyo-header-dark",
                pack: "center",
            }, {
                kind: "Button",
                className: "enyo-button-affirmative",
                caption: "News",
                onclick: "showNews"
            }, {
                kind: "Button",
                className: "enyo-button-affirmative",
                caption: "Guide des Golfs",
                onclick: "showGolfGuide"
            }, {
                kind: "Button",
                className: "enyo-button-affirmative",
                caption: "Golf Plus",
                onclick: "showGolfPlus"
            }, {
                kind: "Button",
                className: "enyo-button-affirmative",
                caption: "Boutique",
                onclick: "showBoutique"
            }, {
                kind: "Button",
                className: "enyo-button-affirmative",
                caption: "Golf Plus TV",
                onclick: "showGolfPlusTv"
            }, ]
        }, {
            name: "news",
            className: "enyo-bg",
            kind: "MyApps.News",
            lazy: true,
            onBack: "goBack"
        }, {
            name: "golfguide",
            className: "enyo-bg",
            kind: "MyApps.GolfGuide",
            lazy: true,
            onBack: "goBack"
        }, {
            name: "golfplus",
            className: "enyo-bg",
            kind: "MyApps.GolfPlus",
            lazy: true,
            onBack: "goBack"
        }, {
            name: "boutique",
            className: "enyo-bg",
            kind: "MyApps.Boutique",
            lazy: true,
            onBack: "goBack"
        }, {
            name: "golfplustv",
            className: "enyo-bg",
            kind: "MyApps.GolfPlusTv",
            lazy: true,
            onBack: "goBack"
        }, ]
    }, ],
    showNews: function(){
        this.$.pane.selectViewByName("news");
    },
    showGolfGuide: function(){
        this.$.pane.selectViewByName("golfguide");
    },
    
    showGolfPlus: function(){
        this.$.pane.selectViewByName("golfplus");
    },
    
    showBoutique: function(){
        this.$.pane.selectViewByName("boutique");
    },
    showGolfPlusTv: function(){
        this.$.pane.selectViewByName("golfplustv");
    },
    
    feedSelected: function(inSender, inFeed){
        this.$.pane.selectViewByName("detail");
        this.$.detail.setUrl(inFeed.link);
    },
    linkClicked: function(inSender, inUrl){
        this.$.detail.setUrl(inUrl);
        this.$.pane.selectViewByName("detail");
    },
    goBack: function(inSender, inEvent){
        this.$.pane.back(inEvent);
    },

});

